<?php

/*@var $tra Transaction*/
?>

<p><?php echo __("The following transactions has beed executed from T.A")?> :</p>
<p>

<table>
    <tr>
        <td><?php echo __('Employee code')?></td>
        <td><?php echo __('Employee name')?></td>
        <td><?php echo __('UnClosed function')?></td>
        <td><?php echo __('Transaction Type')?></td>
        <td><?php echo __('Time out')?></td>
        <td><?php echo __('Time in')?></td>
    </tr>
    <?php foreach ($trs as $tra){
        $type = $tra->getTransactionType();
        if(is_null_date($tra->getDateFrom()) || is_null_date($tra->getDateTo())){
            continue;
        }
        ?>
        <tr>
            <td><?php echo $tra->getEmployee()->getCode()?></td>
            <td><?php echo $tra->getEmployee()?></td>
            <td><?php echo globals::$TRANSACTION_LIST[$type]?></td>
            <td><?php echo $tra->getCodeLeaveType()?></td>
            <td style="color:<?php echo $type==globals::NO_CLOSEING_LEAVE_START ? 'red' : 'green'?>"><?php echo $tra->getDateFrom()?></td>
            <td style="color:<?php echo $type==globals::NO_CLOSEING_LEAVE_END   ? 'red' : 'green'?>"><?php echo $tra->getDateTo()?></td>
        </tr>    
    <?php }?>
</table>

</p>